package top.lyc829.zzl_android.ui.setting;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.ViewGroup;

import com.xuexiang.xui.XUI;
import com.xuexiang.xui.utils.DensityUtils;
import com.xuexiang.xui.widget.actionbar.TitleBar;
import com.xuexiang.xui.widget.grouplist.XUICommonListItemView;
import com.xuexiang.xui.widget.grouplist.XUIGroupListView;

import top.lyc829.zzl_android.R;

public class BackActivity extends AppCompatActivity {

    XUIGroupListView mSettingBackGroupListView;
    XUICommonListItemView itemNumber,itemEmile,itemQQ;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_back);
        ((TitleBar)findViewById(R.id.m_title_bar_back)).setLeftClickListener(v -> {
            finish();
        });

        mSettingBackGroupListView = findViewById(R.id.settingBackGroupListView);

        initGroupListViewBack();
    }

    private void initGroupListViewBack()
    {
        itemEmile=mSettingBackGroupListView.createItemView("官方邮箱");
        itemEmile.setDetailText("11111111111@123.com");
        itemEmile.setAccessoryType(XUICommonListItemView.ACCESSORY_TYPE_CHEVRON);

        itemNumber=mSettingBackGroupListView.createItemView("官方号码");
        itemNumber.setDetailText("111123456");
        itemNumber.setAccessoryType(XUICommonListItemView.ACCESSORY_TYPE_CHEVRON);

        itemQQ=mSettingBackGroupListView.createItemView("官方QQ");
        itemQQ.setDetailText("12345678909");
        itemQQ.setAccessoryType(XUICommonListItemView.ACCESSORY_TYPE_CHEVRON);

        int size = DensityUtils.dp2px(this,20);
        XUIGroupListView.newSection(this)
                .setLeftIconSize(size, ViewGroup.LayoutParams.WRAP_CONTENT)
                .addItemView(itemEmile, null)
                .addItemView(itemNumber, null)
                .addItemView(itemQQ, null)

                .addTo(mSettingBackGroupListView);

    }
}